package com.lhd._05mvcboot03.config;

import com.lhd._05mvcboot03.interceptors.UserLoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author lhd
 * @date 2024/4/28
 * @apiNote
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {
    public void addInterceptors	(InterceptorRegistry registry)
    {
        registry.addInterceptor(new UserLoginInterceptor())
                .addPathPatterns("/v1/users/article","/v1/users/selectByArticleId");
    }

}
